	import java.util.Observable;
	
	/**
	 * Upon notification, lists the deliveries that were read into the vector stored in
	 * the CommonData class.
	 * 
	 * @author Mathieu St-Jean
	 * @version 1.0 13/06/28
	 */

	/*
	 * Modification Log **********************************************************
	 * v1.0, Mathieu St-Jean, 13/06/28 - Original version.
	 * ***************************************************************************
	 */

	public class ListUnassignedDelivery extends Communication{

		public ListUnassignedDelivery(Integer registrationNumber, String componentName) {
			super(registrationNumber, componentName);
		}

		/**
		 * The update() method is an abstract method that is called whenever the
		 * notifyObservers() method is called by the Observable class First we check
		 * to see if the NotificationNumber is equal to this thread's
		 * RegistrationNumber. If they are, then we execute.
		 * 
		 * @see ca.etsmtl.log430.lab3.Communication#update(java.util.Observable,
		 *      java.lang.Object)
		 */
		public void update(Observable thing, Object notificationNumber) {

			if (registrationNumber.compareTo((Integer) notificationNumber) == 0) {
				Displays display = new Displays();
				
				DeliveryList allDeliveriesLst = (DeliveryList) CommonData.theListOfDeliveries.getListOfDeliveries();

				display.displayUnassignedDeliveryList(allDeliveriesLst);
			}
		}
	}
